package com.shoulder.boot.acl.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.shoulder.core.api.ApiDelete;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 菜单信息
 *
 * @author 596767880@qq.com
 * @since 2024-01-05 21:12:42
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("acl_menu")
public class Menu extends ApiDelete {

    /**
     * 菜单路径
     */
    @TableField("path")
    private String path;

    /**
     * 菜单名称
     */
    @TableField("title")
    private String title;

    /**
     * 组件标识
     */
    @TableField("name")
    private String name;
    /**
     * 菜单图标
     */
    @TableField("icon")
    private String icon;
    /**
     * 菜单类型
     * 1-业务,2-菜单,3-按钮
     */
    @TableField("type")
    private Integer type;
    /**
     * 权限编码
     */
    @TableField("code")
    private String code;
    /**
     * 上级菜单
     */
    @TableField("parent_id")
    private String parentId;

    /**
     * 子菜单
     */
    @TableField(exist = false)
    @JsonInclude(value = JsonInclude.Include.NON_EMPTY)
    private List<Menu> children;

}
